import request from '@/utils/request'

// 查询项目列表
export function listProject(query) {
  return request({
    url: '/genius/platform-project/list',
    method: 'get',
    params: query
  })
}

// 查询项目详细
export function getProjectDetail(id) {
  return request({
    url: '/genius/platform-project/' + id,
    method: 'get'
  })
}

// 新增项目
export function addProject(data) {
  return request({
    url: '/genius/platform-project',
    method: 'post',
    data: data,
    timeout: 60 * 3 * 1000
  })
}

// 修改项目
export function updateProject(data) {
  return request({
    url: '/genius/platform-project',
    method: 'put',
    data: data
  })
}
// 导出项目信息
export function exportProject(data) {
  return request({
    url: '/genius/platform-project/export',
    method: 'post',
    data: data
  })
}

// 删除项目信息
export function delProject(ids) {
  return request({
    url: '/genius/platform-project/' + ids   ,
    method: 'delete'
  })
}

//获取算法调用次数
export function getArithmeticCount(params){
  return request({
    url: '/genius/platform-arithmetic-count/list',
    method: 'get',
    params
  })
}
